package com.morehair.mapper;

import com.morehair.bean.pojo.Category;
import com.morehair.bean.pojo.Goods;
import com.morehair.bean.pojo.GoodsExample;
import com.morehair.bean.pojo.GoodsStat;
import com.morehair.bean.vo.admin.GoodsVo;
import com.morehair.bean.vo.wx.GoodsOfFloorVo;
import com.morehair.bean.vo.wx.HomeIndexVo;
import com.morehair.bean.vo.wx.RelatedDataVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * Description: 商品管理
 * Date: 2021/6/5
 * Time: 19:31
 * author: zhang wei
 */
public interface GoodsMapper {

    long countByExample(GoodsExample example);

    int deleteByExample(GoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Goods record);

    int insertSelective(Goods record);

    List<Goods> selectByExampleWithBLOBs(GoodsExample example);

    List<Goods> selectByExample(GoodsExample example);

    Goods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExampleWithBLOBs(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExample(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKeyWithBLOBs(Goods record);

    int updateByPrimaryKey(Goods record);

    int getTheId(String name, String goodsSn, Integer categoryId);

    List<GoodsStat> selectGoodsStat();

    int fakeDeleteById(@Param("id") Integer id, @Param("updateTime") Date updateTime);

    List<Goods> selectByRandom();

    List<HomeIndexVo.HotGoodsList> selectToHotGoodsList();

    List<GoodsOfFloorVo> selectBySid(Category categoryForSid);

    List<Goods> selectAllGoods();

    Goods selectShareImg(Integer id);

    GoodsVo selectToGoodsVo(Integer id);

    List<GoodsOfFloorVo> selectByRandomExceptId(Integer id);

    List<Goods> selectByBrandId(Integer brandId);
}
